package cn.tedu.work;

import org.junit.jupiter.api.Test;

public class DemoTest {
@Test
    public void test(){
    Father father=new Son();
    father.eat("你是谁");
    System.out.println(father.name);
    System.out.println(father.age);

}


}

class Father {
    String name="我是爹";
    int age=99;
    static  int b=10;
    public void test(){
        this.eat("");
    }
    public void test1(){
        System.out.println("我是");
    }
    protected  void  eat( String name){
        System.out.println("我是爹，我要吃饭");
    }
}

class Son extends Father {

    @Override
    public void eat(String name) {
        System.out.println("我是儿子我先吃饭");
    }
}
